package ma.co.ba.BusinessApplications.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "CRITICITES")
public class Criticite implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private int id;


	@Column(name = "LIBELLE_CRITICITE", length = 25)
	private String libelleCriticite;

	@OneToMany(mappedBy = "criticite", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	private List<DAT> dats;

	public Criticite() {

	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}


	public String getLibelleCriticite() {
		return libelleCriticite;
	}

	public void setLibelleCriticite(String libelleCriticite) {
		this.libelleCriticite = libelleCriticite;
	}

	public List<DAT> getDats() {
		return dats;
	}

	public void setDats(List<DAT> dats) {
		this.dats = dats;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

}